// Fibonacci series using default constructor

# include <iostream>
using namespace std;

class Fibonacci {
  int f1, f2, f3, n, i;
public:
  Fibonacci();
  void get();
  void display();
};

Fibonacci::Fibonacci() {
  f1 = -1;
  f2 = 1;
}

void Fibonacci::get() {
  cout << "Enter the size of series: ";
  cin >> n;
}

void Fibonacci::display() {
  for(i = 0; i < n; i++) {
    f3 = f1+f2;
    cout << f3 << endl;
    f1 = f2;
    f2 = f3;
  }
}

int main() {
  Fibonacci fib;
  fib.get();
  fib.display();
}
